Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm: add wasmEdge container process to cgroup #87

Merged
merged 1 commit into from
Sep 9, 2023

Conversation

Poorunga
Copy link
Contributor

@Poorunga Poorunga commented Sep 7, 2023

Add wasmEdge container process to cgroup, follow up #74

@Poorunga Poorunga requested a review from a team as a code owner September 7, 2023 11:55
@@ -263,9 +276,7 @@ impl ProcessLifecycle<ExecProcess> for WasmEdgeExecLifecycle {
}

async fn delete(&self, _p: &mut ExecProcess) -> containerd_shim::Result<()> {
Err(Error::Unimplemented(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exec in wasm container is still not supported, so should return Err here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -75,3 +76,23 @@ pub fn get_memory_limit(spec: &Spec) -> Option<i64> {
.and_then(|x| x.memory().as_ref())
.and_then(|x| x.limit())
}

pub(crate) fn get_rootfs(spec: &Spec) -> containerd_shim::Result<String> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to return Option, let the caller decide how to handle None

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

"rootfs is not set in runtime spec".to_string(),
))?
.path();
mkdir(rootfs, 0o711).await?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this mkdir removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, will update later

Signed-off-by: Poorunga <2744323@qq.com>
Copy link
Member

@Burning1020 Burning1020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good job, thank you.

@Burning1020 Burning1020 merged commit c15b71f into kuasar-io:main Sep 9, 2023
13 checks passed
@Poorunga Poorunga deleted the add-cgroup branch September 9, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants